package com.kdzy.lshy.socity_server.controller;

import com.kdzy.lshy.socity_server.common.RequestConver;
import com.kdzy.lshy.socity_server.service.BaseService;
import com.kdzy.lshy.socity_server.service.MyJobService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping(value = "/")
@CrossOrigin("*")
public class MyJobController extends BaseService {

    @Autowired
    MyJobService myjob;

    //查询我的工作
    @RequestMapping(value = "/findMyJob", method = RequestMethod.POST)
    public Object findMyJob(String param, HttpServletRequest request) {
        return myjob.findMyJob(param, request);
    }

    //查询我的工作详情
    @RequestMapping(value = "/findDetails", method = RequestMethod.POST)
    public Object findDetails(String param, HttpServletRequest request) {
        return myjob.findDetails(param, request);
    }

    //今日预约查询
    @RequestMapping(value = "/findTodayWork", method = RequestMethod.POST)
    public Object findTodayWork(String param, HttpServletRequest request) {
        return myjob.findTodayWork(param, request);
    }

    //今日预约总数和已完成数查询
    @RequestMapping(value = "/workMessage", method = RequestMethod.POST)
    public Object workMessage(String param, HttpServletRequest request) {
        return myjob.workMessage(param, request);
    }
}